import React, { Component } from 'react';
export default  class Item extends Component {

    changaeFormData = (id,value)=>{
        let {onChooseRow} = this.props
        onChooseRow(id,value)
    }
    render() {
        let {
            name,
            checked,
            id
        } = this.props
        return (
           <>
              <input
                    className='choose'
                    type="checkbox"
                    checked={checked}
                    onChange={(e)=>this.changaeFormData(id,e.target.checked)}
                />
                <span>{name}</span>
           </>
        );
    }
}

